/**
 * 
 */
package contentDetermination;

/**
 * @author Elena
 * Objeto con la info del agente
 */
public class Agent {
	
	
	private String name;
	private String kind;
	private String role;
	private int leadership;
	private int interesPrimario;
	private int interesIntrinsecoSujeto;
	private int interesIntrinsecoComplemento;
	
	public Agent(String name, String kind, String role, int leadership) {
		super();
		this.name = name;
		this.kind = kind;
		this.role = role;
		this.leadership = leadership;
		//this.interesPrimario = 1;
		setInteresPrimario();
		this.interesIntrinsecoSujeto = 0;
		this.interesIntrinsecoComplemento = 0;
	}
	
	private void setInteresPrimario(){
		if (kind.contains("Fire")){
			interesPrimario = 500;
		}
		else if (kind.contains("Person")){
			if (role.contains("Independent"))
				interesPrimario = 100;
			else if (role.contains("Leader"))
				interesPrimario = 50;
			else if (role.contains("Independent"))
				interesPrimario = 10;
		}
	}

	public Agent(String name, String kind) {
		super();
		this.name = name;
		this.kind = kind;
		setInteresPrimario();
		this.interesIntrinsecoSujeto = 0;
		this.interesIntrinsecoComplemento = 0;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getKind() {
		return kind;
	}

	public void setKind(String kind) {
		this.kind = kind;
	}

	public String getRole() {
		return role;
	}

	public void setRole(String role) {
		this.role = role;
	}

	public int getLeadership() {
		return leadership;
	}

	public void setLeadership(int leadership) {
		this.leadership = leadership;
	}

	public int getInterest() {
		return getInteresPrimario()*(interesIntrinsecoComplemento + interesIntrinsecoSujeto);
	}


	public void setInteresPrimario(int interesPrimario) {
		this.interesPrimario = interesPrimario;
	}

	public void addInteresIntrinsecoSujeto(int plusInteresIntrinsecoSujeto) {
		this.interesIntrinsecoSujeto = this.interesIntrinsecoSujeto+plusInteresIntrinsecoSujeto;
	}

	public void addInteresIntrinsecoComplemento(int plusInteresIntrinsecoComplemento) {
		if (this.name.contains("Group"))
			//System.out.println("soy un grupo");
		this.interesIntrinsecoComplemento = interesIntrinsecoComplemento+plusInteresIntrinsecoComplemento;
	}
	
	protected int getInteresPrimario(){
		return interesPrimario;
	}

	
	
	
	

}
